// pages/home/home.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    "fittop": 0,
    "bar_Height": wx.getSystemInfoSync().statusBarHeight,
    "widnowW": wx.getSystemInfoSync().screenWidth,
    background: [
      "https://ccyfiles.oss-cn-shenzhen.aliyuncs.com/pn/ccyfiles/2019/5/17/83d87851-ddf2-49c3-9aad-2268144cad5f.jpg",
      "https://ccyfiles.oss-cn-shenzhen.aliyuncs.com/pn/ccyfiles/2019/5/17/4139dd74-b003-47e5-83f9-d83fc1827b7f.jpg",
      "https://ccyfiles.oss-cn-shenzhen.aliyuncs.com/pn/ccyfiles/2019/5/16/8b2209c1-5c27-49d2-bedc-2ed08fc9d611.png",
      "https://ccyfiles.oss-cn-shenzhen.aliyuncs.com/pn/ccyfiles/2019/5/16/698c31e9-489a-4e25-b034-3a4d33b681b8.jpg",
      "https://ccyfiles.oss-cn-shenzhen.aliyuncs.com/pn/ccyfiles/2019/4/25/d8cb26c5-50fd-4502-bfed-44896fc41992.jpg",
    ]
  },
  "fitscreen": function() {
    if (this.data['widnowW'] >= 768) {
      this.setData({
        "fittop": 30
      })
    }
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) {
    var that = this
    that.fitscreen()
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function() {

  }
})